package com.example.day13;

import java.util.List;

public class PurcaseTest {
    public static void main(String[] args) {

        Pucase p1=new Pucase(1,"西瓜",11.2);
        Pucase p2=new Pucase(2,"香蕉",15.2);
        Pucase p3=new Pucase(3,"西红柿",13.2);
        Pucase p4=new Pucase(4,"豆角",14.2);
        Pucase p5=new Pucase(5,"韭菜",16.2);
        Pucase p6=new Pucase(6,"青菜",17.2);
        PurcaseDemoImp demoImp=new PurcaseDemoImp();

        demoImp.save(p1);
        demoImp.save(p2);
        demoImp.save(p3);
        demoImp.save(p4);
        demoImp.save(p5);
        demoImp.save(p6);

        List<Pucase> all = demoImp.getAll();
        for (Pucase pucase : all) {
            System.out.println(pucase);
        }


        demoImp.delbyPrice(15.0);
        System.out.println("=================================================");
        List<Pucase> all1 = demoImp.getAll();
        for (Pucase pucase : all1) {
            System.out.println(pucase);
        }
    }
}
